package com.mes.biz.service.impl;

import java.util.List;
import org.springframework.stereotype.Service;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.github.pagehelper.PageInfo;
import com.mes.common.core.domain.BaseEntity;
import com.mes.common.core.service.BaseServiceImpl;
import com.mes.biz.mapper.BizCostDetailMapper;
import com.mes.biz.domain.BizCostDetail;
import com.mes.biz.service.BizCostDetailService;
import org.springframework.transaction.annotation.Transactional;

/**
 * 收支单明细Service业务层处理
 * @author wy
 * @email wy
 * @date 2023-08-25
 */
@Service
@Transactional(readOnly = true)
public class BizCostDetailServiceImpl extends BaseServiceImpl<BizCostDetailMapper, BizCostDetail> implements BizCostDetailService {

    private static final Logger log = LoggerFactory.getLogger(BizCostDetailServiceImpl.class);

    /**
     * 获取单条数据
     * @param bizCostDetail 收支单明细
     * @return 收支单明细
     */
    @Override
    public BizCostDetail get(BizCostDetail bizCostDetail) {
        BizCostDetail dto = super.get(bizCostDetail);
        return dto;
    }

    /**
     * 获取单条数据
     * @param id 收支单明细id
     * @return 收支单明细
     */
    @Override
    public BizCostDetail get(String id) {
        BizCostDetail dto = super.get(id);
        return dto;
    }

    /**
     * 查询收支单明细列表
     * @param bizCostDetail 收支单明细
     * @return 收支单明细
     */
    @Override
    public List<BizCostDetail> findList(BizCostDetail bizCostDetail) {
		List<BizCostDetail> bizCostDetailList = super.findList(bizCostDetail);
        return bizCostDetailList;
    }

    /**
     * 分页查询收支单明细列表
     * @param bizCostDetail 收支单明细
     * @return 收支单明细
     */
    @Override
    public PageInfo<BizCostDetail> findPage(BizCostDetail bizCostDetail) {
		PageInfo<BizCostDetail> page = super.findPage(bizCostDetail);
        return page;
    }

    /**
     * 保存收支单明细
     * @param bizCostDetail
     * @return 结果
     */
    @Override
    public boolean save(BizCostDetail bizCostDetail) {
        return super.save(bizCostDetail);
    }

    /**
     * 删除收支单明细信息
     * @param bizCostDetail
     * @return 结果
     */
    @Override
    public boolean remove(BizCostDetail bizCostDetail) {
        return super.remove(bizCostDetail);
    }

    /**
     * 批量删除收支单明细
     * @param ids 需要删除的收支单明细ID
     * @return 结果
     */
    @Transactional(readOnly = false)
    @Override
    public int deleteBizCostDetailByIds(String[] ids) {
        return mapper.deleteBizCostDetailByIds(ids, BaseEntity.DEL_FLAG_DELETE);
    }

    @Override
    public List<BizCostDetail> selectByCostId(String id) {
        return mapper.selectByCostId(id);
    }

}
